package day10;

import java.util.Scanner;

public class Main {
    public boolean checkWon(int[][] board) {
        // write code here
        int len = board.length;
        int sum1 = 0;//用于判断横向
        int sum2 = 0;//用于判断纵向
        int sum3 = 0;//用于判断主对角线
        int sum4 = 0;//用于判断副对角线
        for(int i = 0; i < len; i++) {
            sum1 = 0;
            sum2 = 0;
            sum3 += board[i][i];
            sum4 += board[i][len - i - 1];
            for(int j = 0; j < len; j++) {
                sum1 += board[i][j];
                sum2 += board[j][i];
            }
            if(sum1 == len || sum2 == len || sum3 == len || sum4 == len) {
                return true;
            }
        }
        return false;
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLine()) { // 注意 while 处理多个 case
            String str = in.nextLine();
            int len = str.length();
            int sor = 0;
            int sor1 = 0;//记录字符长度得分
            int num2 = 0;//记录小写字母
            int num3 = 0;//记录大写字母
            int num4 = 0;//记录数字
            int num5 = 0;//记录符号
            int sor2 = 0;//记录字母得分
            int sor3 = 0;//记录数字得分
            int sor4 = 0;//记录符号得分
            int sor5 = 0;//记录奖励得分
            if(len <= 4) {
                sor1 = 5;
            }else if(len <= 7) {
                sor1 = 10;
            }else {
                sor1 = 25;
            }
            for(int i = 0; i < len; i++) {
                char q = str.charAt(i);
                if(q >= 'a' && q <= 'z') {
                    num2++;
                }else if(q >= 'A' && q <= 'Z') {
                    num3++;
                }else if(q >= '0' && q <= '9') {
                    num4++;
                }else if(q >= 0x21 && q <= 0x2F || q > 0x3A && q < 0x40 || q > 0x5B && q < 0x60 || q > 0x7B && q < 0x7E) {
                    num5++;
                }
            }
            if(num2 !=0 && num3 != 0) {
                sor2 = 20;
            }else if(num2 !=0 || num3 != 0) {
                sor2 = 10;
            }
            if(num4 > 1) {
                sor3 = 20;
            }else if(num4 == 1) {
                sor3 = 10;
            }
            if(num5 > 1) {
                sor4 = 25;
            }else if(num5 == 1) {
                sor4 = 10;
            }


            if(num2 != 0 && num3 != 0 && num4 != 0 && num5 != 0) {
                sor5 = 5;
            }else if((num2 != 0 || num3 != 0) && num4 != 0 && num5 != 0) {
                sor5 = 3;
            }else if((num2 != 0 || num3 != 0) && num4 != 0) {
                sor5 = 2;
            }
            sor = sor1 + sor2 + sor3 +sor4 + sor5;
            if(sor >= 90) {
                System.out.println("VERY_SECURE");
            }else if(sor >= 80) {
                System.out.println("SECURE");
            }else if(sor >= 70) {
                System.out.println("VERY_STRONG");
            }else if(sor >= 60) {
                System.out.println("STRONG");
            }else if(sor >= 50) {
                System.out.println("AVERAGE");
            }else if(sor >= 25) {
                System.out.println("WEAK");
            }else {
                System.out.println("VERY_WEAK");
            }
        }
    }
}
